﻿<div class="blade-content __medium-wide">
    <div class="blade-inner">
        <div class="inner-block">
            <form name="detailForm" class="form">
                <fieldset ng-init="setForm(detailForm);">
                    <div class="form-group">
                        <label class="form-label">Is active</label>
                        <div class="form-input">
                            <label class="form-label __switch">
                                <input type="checkbox" ng-model="blade.currentEntity.isActive" />
                                <span class="switch"></span>
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">Name</label>
                        <div class="form-input">
                            <input focus-on="" required class="form-control" ng-model="blade.currentEntity.name" placeholder="Enter category name" />
                        </div>
                    </div>
                    <div class="columns clearfix">
                        <div class="column">
                            <div class="form-group">
                                <label class="form-label">Code</label>
                                <div class="form-input">
                                    <input required class="form-control" ng-model="blade.currentEntity.code" placeholder="Enter category code" name="code" ui-validate=" 'codeValidator($value)' " />
                                </div>
                                <div class="form-error" data-ng-show="detailForm.code.$dirty">
                                    <!--<span data-ng-show="detailForm.code.$error.required">Required</span>-->
                                    <span data-ng-show="detailForm.code.$error.validator">Code can't contain $+;=%{}[]|\/@ ~#!^*&()?:'<>, characters</span>
                                </div>
                            </div>
                        </div>
                        <div class="column">
                            <div class="form-group">
                                <label class="form-label">Tax type <a href="" ng-click="openDictionarySettingManagement()" va-permission="platform:setting:update"><i class="form-ico fa fa-pencil"></i></a></label>
                                <div class="form-input">
                                    <ui-select ng-model="blade.currentEntity.taxType">
                                        <ui-select-match allow-clear="true" placeholder="Select...">{{$select.selected}}</ui-select-match>
                                        <ui-select-choices repeat="x in taxTypes | filter: $select.search">
                                            <span ng-bind-html="x | highlight: $select.search"></span>
                                        </ui-select-choices>
                                    </ui-select>
                                </div>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </form>

            <va-widget-container group="categoryDetail" blade="blade" gridster-opts="{width: 396}"></va-widget-container>
        </div>
    </div>
</div>